package cn.itcast.controller;

import cn.itcast.mapper.LogMapper;
import cn.itcast.pojo.*;
import cn.itcast.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/log")
public class LogController {
    @Autowired
    private LogService logService;
    /**
     * 分页查询
     * @param querysString
     * @return
     */
    @GetMapping("/page")
    public Result page(QuerysString querysString) {
        PageInfo<OperateLog> page = logService.page(querysString);

        return page != null ? Result.success(page) : Result.erro("查询失败");
    }
}
